<template>
  <div class="loginCon f-cb">
    <div class="login_right">
      <div class="login_change_box f-cb">
        <div class="login_left" :style="style">
          <img v-if="linkLogo" :src="linkLogo" alt="" class="logo" />
          <p class="fonts">Based on LinkTrade ©LINKSOFT</p>
        </div>
        <div class="login_content">
          <div class="f-cb login_top">
            <div class="language_change fr" @click="selectLang">
              <span>{{ $t("views.login.56i01nqsbp40") }}</span> |
              <span>EN</span>
            </div>
          </div>
          <div v-if="ForgetPasswordShow == false">
            <ul class="title f-cb">
              <li
                v-for="(item, index) in title_list"
                :key="index"
                @click="change_type(index)"
                :class="listShow == index ? 'hover' : ''"
              >
                {{ item.name }}
              </li>
            </ul>
            <ul class="box_change f-cb">
              <li v-if="listShow == 0">
                <div class="first_step" v-if="step == 1">
                  <TelInput
                    @mobileChange="mobileChange"
                    @codeChange="codeChange"
                    ObjectName="register_data"
                  >
                    <h2>{{ $t("m.phone_number") }}</h2>
                  </TelInput>
                  <h2>{{ $t("m.SMSCode") }}</h2>
                  <div class="f-cb code box">
                    <input
                      type="text"
                      v-model="register_data.captcha"
                      :placeholder="$t('m.inputCode')"
                    />
                    <input
                      type="button"
                      v-model="name"
                      @click="sends(2)"
                      :disabled="disabled"
                    />
                  </div>
                  <!-- 注册协议 -->
                  <el-checkbox v-model="checked"
                    >{{ $t("views.login.56i01nqscbk0") }}
                    <span class="agreement" @click="tipVisible = true"
                      >《{{ $t("views.login.56i01nqscfw0") }}》</span
                    >
                  </el-checkbox>
                  <button @click="step_change(2)" class="submit">
                    {{ $t("m.NextStep") }}
                  </button>
                </div>
                <!-- 设置登录密码 -->
                <div class="second_step" v-else>
                  <PasswordInput
                    @passwordChange="(val) => (register_data.password = val)"
                    :placeholderContent="$t('m.confirmationPsd')"
                  >
                    <h2>{{ $t("m.SetPassword") }}</h2>
                  </PasswordInput>
                  <PasswordInput
                    @passwordChange="(val) => (register_data.repassword = val)"
                    :placeholderContent="$t('m.confirmationPsd')"
                  >
                    <h2>{{ $t("m.firmationPsd") }}</h2>
                  </PasswordInput>
                  <h2>{{ $t("m.InvitationCodes") }}</h2>
                  <div class="box psd">
                    <input
                      type="text"
                      v-model="register_data.inviteCode"
                      :placeholder="$t('m.invitationCode')"
                    />
                  </div>
                  <div class="f-cb">
                    <div class="fl" style="width: 47%">
                      <button class="submit" @click="registerSubmit">
                        {{ $t("m.RegisteNow") }}
                      </button>
                    </div>
                    <div class="fr" style="width: 47%">
                      <button class="submit return" @click="step_change(1)">
                        {{ $t("m.Return") }}
                      </button>
                    </div>
                  </div>
                </div>
              </li>
              <li v-else-if="listShow == 1">
                <TelInput
                  key="PasswordLogin"
                  @mobileChange="mobileChange"
                  @codeChange="codeChange"
                  ObjectName="PasswordLogin"
                >
                  <h2>{{ $t("m.phone_number") }}</h2>
                </TelInput>
                <PasswordInput
                  @passwordChange="(val) => (PasswordLogin.password = val)"
                  :placeholderContent="$t('m.PsdDigits')"
                >
                  <h2>{{ $t("m.passwords") }}</h2>
                </PasswordInput>
                <p class="ForgetPasswordText" @click="ForgetPasswordClick">
                  {{ $t("m.forgetPsd") }}
                </p>
                <button @click="passwordCodeSubmit" class="submit">
                  {{ $t("m.determine") }}
                </button>
              </li>
              <li v-else>
                <TelInput
                  key="VerificationLogin"
                  @mobileChange="mobileChange"
                  @codeChange="codeChange"
                  ObjectName="VerificationLogin"
                >
                  <h2>{{ $t("m.phone_number") }}</h2>
                </TelInput>
                <h2>{{ $t("m.SMSCode") }}</h2>
                <div class="f-cb code box leftfix">
                  <input
                    type="text"
                    v-model="VerificationLogin.captcha"
                    :placeholder="$t('m.inputCode')"
                  />
                  <input
                    type="button"
                    v-model="name"
                    @click="sends(1)"
                    :disabled="disabled"
                  />
                </div>
                <button @click="VerificationCodeLogin" class="submit">
                  {{ $t("m.determine") }}
                </button>
              </li>
            </ul>
          </div>
          <div v-else>
            <div v-if="PasswordSentTrue == false">
              <div class="blurfonts">{{ $t("m.RetrieveForgetPsd") }}</div>
              <div class="box_change f-cb">
                <TelInput
                  @mobileChange="mobileChange"
                  @codeChange="codeChange"
                  ObjectName="PasswordSubmit"
                >
                  <h2>{{ $t("m.phone_number") }}</h2>
                </TelInput>
                <h2>{{ $t("m.SMSCode") }}</h2>
                <div class="f-cb code box">
                  <input
                    type="text"
                    v-model="PasswordSubmit.captcha"
                    :placeholder="$t('m.inputCode')"
                  />
                  <input
                    type="button"
                    v-model="name"
                    @click="sends(5)"
                    :disabled="disabled"
                  />
                </div>
                <div class="f-cb">
                  <div class="fl" style="width: 47%">
                    <button class="submit" @click="checkPassword">
                      {{ $t("m.determine") }}
                    </button>
                  </div>
                  <div class="fr" style="width: 47%">
                    <button class="submit return" @click="ForgetPasswordClick">
                      {{ $t("m.Return") }}
                    </button>
                  </div>
                </div>
              </div>
            </div>
            <div v-else>
              <!-- 找回密码 -->
              <div class="blurfonts">{{ $t("m.Setloginpassword") }}</div>
              <div class="box_change f-cb">
                <p class="tis">{{ $t("m.digits") }}</p>
                <PasswordInput
                  @passwordChange="(val) => (PasswordSubmit.newPwd = val)"
                  :placeholderContent="$t('m.Pleaseloginpassword')"
                >
                </PasswordInput>
                <PasswordInput
                  @passwordChange="(val) => (PasswordSubmit.reNewPwd = val)"
                  :placeholderContent="$t('m.rePleaseloginpassword')"
                >
                </PasswordInput>
                <div class="f-cb">
                  <div class="fl" style="width: 47%">
                    <button class="submit" @click="resetPassword">
                      {{ $t("m.determine") }}
                    </button>
                  </div>
                  <div class="fr" style="width: 47%">
                    <button
                      class="submit return"
                      @click="PasswordSentTrue = false"
                    >
                      {{ $t("m.Return") }}
                    </button>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <el-dialog
      width="680px"
      :visible="tipVisible"
      :append-to-body="true"
      :show-close="false"
      :destroy-on-close="true"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      top="10%"
      class="regist_dialog"
    >
      <RegistExplain @hidePan="hidePan" :type="22"></RegistExplain>
    </el-dialog>
  </div>
</template>
<script>
import RegistExplain from "@/components/tip/explain.vue";
import TelInput from "@/components/common/TelInput.vue";
import PasswordInput from "@/components/common/PasswordInput.vue";
import { get_tradeInit, get_sms_check } from "@/assets/js/API/system.js";
import {
  post_resetpwd,
  post_login,
  post_register,
  post_mobile_login,
} from "@/assets/js/API/user.js";
import { get_sms_send } from "@/assets/js/API/system";
export default {
  inject: ["reload"],
  components: {
    RegistExplain,
    TelInput,
    PasswordInput,
  },
  data() {
    return {
      passWordLogo: false,
      codeLogo: true,
      name: this.$i18n.t("m.ObtainCode"),
      disabled: false,
      auth_time: 60,
      auth_timetimer: null,
      Link: "",
      linkLogo: "",
      logoName: "",
      lang: "",
      isRegister: 1, // 判断是否需要邀请码
      invite_code: "", // 邀请码
      tabName: "login",
      register_form: {
        check: false,
      },
      VerificationLogin: {
        mobile: "",
        countryCode: "+86",
        captcha: "",
      },
      PasswordLogin: {
        mobile: "",
        countryCode: "+86",
        password: "",
      },
      register_data: {
        mobile: "",
        countryCode: "+86",
        captcha: "",
        password: "",
        repassword: "",
        inviteCode: "",
      },
      PasswordSubmit: {
        mobile: "",
        countryCode: "+86",
        captcha: "",
        newPwd: "",
        reNewPwd: "",
      },
      title_list: [
        { name: this.$i18n.t("m.register") },
        { name: this.$i18n.t("m.psdlogin") },
        { name: this.$i18n.t("m.codeSubmit") },
      ],
      listShow: 1,
      step: 1,
      style: {
        backgroundImage: "url(" + require("../assets/img/login_bg.jpg") + ")",
        backgroundRepeat: "no-repeat",
      },
      ForgetPasswordShow: false,
      PasswordSentTrue: false,
      checked: false, // 注册协议勾选
      tipVisible: false, // 协议对话框展示
      registerFlag: false, // 注册验证码验证
      event: "", // 短信验证事件
      agreement: {}, // 协议
    };
  },
  beforeCreate() {
    clearInterval(this.auth_timetimer);
    var type = navigator.appName;
    var lang;
    if (type == "Netscape") {
      lang = navigator.language; //获取浏览器配置语言，支持非IE浏览器
    } else {
      lang = navigator.userLanguage; //获取浏览器配置语言，支持IE5+ == navigator.systemLanguage
    }
    if (lang != "zh-CN" && lang != "en" && lang != "zh-TW") {
      lang = "zh-CN"; //获取浏览器配置语言前两位
    } else {
      lang = lang; //获取浏览器配置语言前两位
    }
    if (
      localStorage.getItem("lang") == "undefined" ||
      localStorage.getItem("lang") == "null" ||
      this.$route.query.lang == "undefined" ||
      this.$route.query.lang == null
    ) {
      localStorage.removeItem("lang");
      localStorage.setItem("lang", lang);
    } else if (
      this.$route.query.lang !== "" &&
      this.$route.query.lang !== null &&
      this.$route.query.lang !== "undefined"
    ) {
      localStorage.setItem(
        "lang",
        this.$route.query.lang == null ? "zh-CN" : this.$route.query.lang
      );
    }
    this.$i18n.locale = localStorage.getItem("lang");
  },
  created() {
    this.aplHtml();
  },
  mounted() {
    this.lang = localStorage.getItem("lang");
    window.clearInterval();
    // window.sessionStorage.clear();
    sessionStorage.setItem("color", "RedRose");
  },
  methods: {
    async aplHtml() {
      const res = await get_tradeInit();
      var lang = localStorage.getItem("lang");
      if (res.code != 1) return this.$message.error(res.msg);
      var name = { zh: res.data.name, en: res.data.name_en };
      // 返回文档中所有a标签中rel为icon的href属性
      localStorage.setItem("icon", res.data.icon);
      document.querySelector("[rel*='icon']").href = res.data.icon;
      localStorage.setItem("linkLogo", res.data.logo);
      localStorage.setItem("name", JSON.stringify(name));
      localStorage.setItem("loginBackground", res.data.loginBackground);
      localStorage.setItem("tradeInit", JSON.stringify(res.data));
      this.linkLogo = localStorage.getItem("linkLogo");
      (this.style = {
        backgroundImage: "url(" + localStorage.getItem("loginBackground") + ")",
        backgroundRepeat: "no-repeat",
      }),
        (this.logoName = JSON.parse(localStorage.getItem("name"))[lang]);
    },
    // 清空验证码定时器
    clearValide() {
      clearInterval(this.auth_timetimer); // 清除定时器
      this.auth_timetimer = null;
      this.auth_time = 60;
      this.disabled = false;
      this.name = this.$i18n.t("m.ObtainCode");
    },
    // 隐藏协议对话框
    hidePan() {
      this.tipVisible = false;
    },
    ForgetPasswordClick() {
      this.ForgetPasswordShow = !this.ForgetPasswordShow;
      this.clearValide();
    },
    checkPassword() {
      var _this = this;
      if (_this.PasswordSubmit.captcha == "") {
        this.$message({
          message: this.$i18n.t("m.inputCode"),
          type: "warning",
        });
        return false;
      }
      get_sms_check({
        mobile: _this.PasswordSubmit.mobile,
        event: "resetpwd",
        countryCode: _this.PasswordSubmit.countryCode,
        captcha: _this.PasswordSubmit.captcha,
      })
        .then(function (response) {
          if (response.code == 1) {
            _this.$message({
              message: response.msg,
              type: "success",
            });
            _this.PasswordSentTrue = true;
            _this.clearValide();
          } else {
            _this.$message({
              message: response.msg,
              type: "warning",
            });
          }
        })
        .catch(function (error) {
          console.log(error);
        });
    },
    resetPassword() {
      var _this = this;
      var rgs = /^(?!(?:[0-9]+|[a-zA-Z]+|[-\/\\^$*+?.()|[\]{}]+)$)[!-~]{8,16}$/;
      //console.log(_this.PasswordSubmit,'resetPassword')
      if (_this.PasswordSubmit.newPwd == "") {
        this.$message({
          message: this.$i18n.t("m.inputPsd"),
          type: "warning",
        });
        return false;
      }
      if (!rgs.test(this.PasswordSubmit.newPwd)) {
        this.$message({
          message: this.$i18n.t("m.digits"),
          type: "warning",
        });
        return false;
      } else if (_this.PasswordSubmit.newPwd != _this.PasswordSubmit.reNewPwd) {
        this.$message({
          message: this.$i18n.t("m.twoMatch"),
          type: "warning",
        });
        return false;
      } else {
        post_resetpwd({ params: _this.PasswordSubmit })
          .then(function (response) {
            if (response.code == 1) {
              _this.$message({
                message: response.msg,
                type: "success",
              });
              _this.ForgetPasswordShow = false;
            } else {
              _this.$message({
                message: response.msg,
                type: "warning",
              });
            }
          })
          .catch(function (error) {
            console.log(error);
          });
      }
    },
    async step_change(step) {
      if (step == 2) {
        if (!this.checked)
          return this.$message.error(this.$t("views.login.56i01nqscis0"));
        if (!this.register_data.mobile || !this.register_data.captcha)
          return this.$message.error(this.$t("views.login.56i01nqscog0"));
        await this.checkCode();
        if (!this.registerFlag) return;
      }
      this.step = step;
    },
    change_type(type) {
      this.listShow = type;
      clearInterval(this.auth_timetimer);
      this.disabled = false;
      this.auth_time = 60;
      this.register_data.captcha = "";
    },
    closeList(show) {
      this[show] = false;
    },
    selectLang() {
      if (this.lang == "en") this.lang = "zh-CN";
      else this.lang = "en";
      localStorage.setItem("lang", this.lang);
      this.$i18n.locale = this.lang;
      this.$i18n.locale = localStorage.getItem("lang");
      this.$router.push({
        path: "/",
        query: { lang: localStorage.getItem("lang") },
      });
      this.reload();
    },
    VerificationCodeLogin() {
      // this.VerificationLogin.mobile = this.$refs.VerificationLogin.mobile;
      // this.VerificationLogin.countryCode = this.$refs.VerificationLogin.countryCode;
      if (this.VerificationLogin.mobile == "") {
        this.$message({
          message: this.$i18n.t("m.ObtainPhone"),
          type: "warning",
        });
        return false;
      } else if (this.VerificationLogin.captcha == "") {
        this.$message({
          message: this.$i18n.t("m.inputCode"),
          type: "warning",
        });
        return false;
      } else {
        this.yzmlogin();
      }
    },
    passwordCodeSubmit() {
      var rgs = /^(?!(?:[0-9]+|[a-zA-Z]+|[-\/\\^$*+?.()|[\]{}]+)$)[!-~]{8,16}$/;
      if (this.PasswordLogin.mobile == "") {
        this.$message({
          message: this.$i18n.t("m.ObtainPhone"),
          type: "warning",
        });
        return false;
      } else if (this.PasswordLogin.password == "") {
        this.$message({
          message: this.$i18n.t("m.inputPsd"),
          type: "warning",
        });
        return false;
      } else if (!rgs.test(this.PasswordLogin.password)) {
        this.$message({
          message: this.$i18n.t("m.digits"),
          type: "warning",
        });
        return false;
      } else {
        this.accountLogin();
      }
    },
    accountLogin() {
      var _this = this;
      post_login({
        account: _this.PasswordLogin.mobile,
        password: _this.PasswordLogin.password,
        countryCode: _this.PasswordLogin.countryCode,
      })
        .then((res) => {
          if (res.code == 1) {
            // sessionStorage.setItem("index", "0");
            sessionStorage.setItem("token", res.data.userinfo.token);
            // 是否开户
            if (res.data.userinfo.isOpen == false) sessionStorage.setItem("isOpen", 0);
            else sessionStorage.setItem("isOpen", 1);
            // 密码登录默认为老用户登录
            sessionStorage.setItem("index", "1");
            sessionStorage.setItem(
              "userinfo",
              JSON.stringify(res.data.userinfo)
            );
            _this.$router.push({ path: "/quotationCenter" });
          } else {
            _this.$message({
              message: res.msg,
              type: "warning",
            });
          }
        })
        .catch((error) => {
          console.log(error);
        });
    },
    yzmlogin() {
      var _this = this;
      post_mobile_login({
        mobile: _this.VerificationLogin.mobile,
        captcha: _this.VerificationLogin.captcha,
        countryCode: _this.VerificationLogin.countryCode,
      })
        .then(function (res) {
          if (res.code == 1) {
            sessionStorage.setItem("token", res.data.userinfo.token);
            // 是否开户
            sessionStorage.setItem("isOpen", res.data.userinfo.isOpen);
            _this.$store.dispatch("isNewChange", res.data.userinfo.isOpen);
            // 验证码登录可以请求到isNew，若为0：老用户，1：新用户
            sessionStorage.setItem("index", "1");
            _this.$router.push({ path: "/quotationCenter" });
          } else {
            _this.$message({
              message: res.msg,
              type: "warning",
            });
          }
        })
        .catch(function (error) {
          console.log(error);
        });
    },
    codeClick() {
      var _this = this;
      this.disabled = true;
      this.auth_timetimer = setInterval(() => {
        _this.auth_time--;
        _this.name = _this.auth_time + _this.$i18n.t("m.result");
        if (_this.auth_time <= 0) {
          _this.clearValide();
        }
      }, 1000);
    },
    // 短信接口
    sends(val) {
      //1 登录 2 注册
      let _this = this;
      let mobile = "";
      _this.event = "";
      let countryCode = "";
      if (val == 1) {
        if (_this.VerificationLogin.mobile == "") {
          this.$message({
            message: this.$i18n.t("m.ObtainPhone"),
            type: "warning",
          });
          return false;
        }
        mobile = _this.VerificationLogin.mobile;
        _this.event = "mobilelogin";
        countryCode = _this.VerificationLogin.countryCode;
      } else if (val == 2) {
        if (_this.register_data.mobile == "") {
          this.$message({
            message: this.$i18n.t("m.ObtainPhone"),
            type: "warning",
          });
          return false;
        }
        mobile = _this.register_data.mobile;
        _this.event = "register";
        countryCode = _this.register_data.countryCode;
      } else {
        if (_this.PasswordSubmit.mobile == "") {
          this.$message({
            message: this.$i18n.t("m.ObtainPhone"),
            type: "warning",
          });
          return false;
        }
        mobile = _this.PasswordSubmit.mobile;
        _this.event = "resetpwd";
        countryCode = _this.PasswordSubmit.countryCode;
      }
      get_sms_send({
        mobile,
        event: _this.event,
        countryCode,
      })
        .then(function (response) {
          if (response.code == 1) {
            _this.$message({
              message: response.msg,
              type: "success",
            });
            // _this.isRegister = response.data.isRegister;
            _this.codeClick();
          } else {
            _this.$message({
              message: response.msg,
              type: "warning",
            });
          }
        })
        .catch(function (error) {
          console.log(error);
        });
    },
    toModal(val) {
      //协议弹窗
      this.$refs.xieyiModal.init(val);
    },
    registerSubmit() {
      var rgs = /^(?!(?:[0-9]+|[a-zA-Z]+|[-\/\\^$*+?.()|[\]{}]+)$)[!-~]{8,16}$/;
      if (this.register_data.mobile == "") {
        this.$message({
          message: this.$i18n.t("m.ObtainPhone"),
          type: "warning",
        });
        return false;
      } else if (this.register_data.captcha == "") {
        this.$message({
          message: this.$i18n.t("m.inputCode"),
          type: "warning",
        });
        return false;
      } else if (this.register_data.password == "") {
        this.$message({
          message: this.$i18n.t("m.inputPsd"),
          type: "warning",
        });
        return false;
      } else if (!rgs.test(this.register_data.password)) {
        this.$message({
          message: this.$i18n.t("m.digits"),
          type: "warning",
        });
        return false;
      } else if (this.register_data.repassword == "") {
        this.$message({
          message: this.$i18n.t("m.confirmationPsd"),
          type: "warning",
        });
        return false;
      } else if (this.register_data.password != this.register_data.repassword) {
        this.$message({
          message: this.$i18n.t("m.twoMatch"),
          type: "warning",
        });
        return false;
      } else {
        this.registerData();
      }
    },
    registerData() {
      var _this = this;
      post_register(_this.register_data)
        .then(function (res) {
          if (res.code == 1) {
            sessionStorage.setItem("token", res.data.userinfo.token);
            if (res.data.userinfo.isOpen == false) sessionStorage.setItem("isOpen", 0);
            else sessionStorage.setItem("isOpen", 1);
            sessionStorage.setItem(
              "userinfo",
              JSON.stringify(res.data.userinfo)
            );
            sessionStorage.setItem("SetHeadpic", res.data.userinfo.avatar);
            sessionStorage.setItem("SetNickname", res.data.userinfo.nickname);
            sessionStorage.setItem("SetAccount", res.data.userinfo.account);
            sessionStorage.setItem("SetRealName", res.data.userinfo.realname);
            sessionStorage.setItem("index", "1");
            _this.$router.push({ path: "/quotationCenter" });
          } else {
            _this.$message({
              message: res.msg,
              type: "warning",
            });
          }
        })
        .catch(function (error) {
          console.log(error);
        });
    },
    // 检验验证码是否正确
    async checkCode() {
      this.registerFlag = false;
      if (this.captcha == "")
        return this.$message.error(this.$i18n.t("m.inputCode"));
      const res = await get_sms_check({
        mobile: this.register_data.mobile,
        captcha: this.register_data.captcha,
        countryCode: this.register_data.countryCode,
        event: this.event,
      });
      if (res.code != 1) {
        return this.$message.error(res.msg);
      } else this.registerFlag = true;
    },
    mobileChange(val, obj) {
      this[obj].mobile = val;
    },
    codeChange(val, obj) {
      this[obj].countryCode = val;
    },
  },
  beforeDestroy() {
    clearInterval(this.auth_timetimer);
  },
};
</script>
<style lang="css">
@import "~@/assets/css/style.css";
</style>
<style lang="less">
.login_top {
  position: absolute;
  top: 3%;
  right: 2%;
}
.loginCon .login_left .fonts,
.loginCon .login_right .language_change,
.loginCon .box_change h2 {
  color: @loginFontColor;
}
.loginCon .login_content .title li {
  color: @fbSix;
}
.loginCon .login_content .title li:after {
  background: @fbSix;
}
.loginCon .login_content .title li:hover,
.loginCon .login_content .title li.hover {
  color: @hoverColor;
}
.loginCon .leftfix {
  padding-left: 0;
  padding-right: 0;
}
.loginCon .box_change .box {
  margin-bottom: 8px;
}
.loginCon .box_change .box.on {
  margin-bottom: 20px;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
  color: @fbSix;
}

input::-moz-placeholder,
textarea::-moz-placeholder {
  color: @fbSix;
}

input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: @fbSix;
}

input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: @fbSix;
}
.loginCon .box_change .code {
  border: 1px solid @hoverColor;
  border-radius: 3px;
  overflow: hidden;
  input[type="text"] {
    width: 179px;
    height: 38px;
    line-height: 38px;
    padding: 0 10px;
    border: none;
  }
  input[type="button"] {
    width: calc(100% - 199px);
    border: none;
    height: 38px;
    line-height: 38px;
    color: @fff;
    background: @hoverColor;
  }
}
.loginCon .box_change .submit {
  width: 100%;
  text-align: center;
  border: none;
  color: @fff;
  background: @hoverColor;
  height: 40px;
  line-height: 40px;
  border-radius: 3px;
  margin-top: 32px;
}
.loginCon .box_change .submit.return {
  background: @fbSix;
}
.loginCon .box_change .psd {
  border: 1px solid @fbSix;
  border-radius: 3px;
  padding: 0 10px;
}
.loginCon .box_change .psd input {
  border: none;
  height: 38px;
  padding-left: 15px;
  line-height: 38px;
  width: 100%;
  box-sizing: border-box;
}
.box_change .agreement {
  color: @blue;
}
.regist_dialog {
  .el-dialog {
    background-color: @fff;
    .el-dialog__header {
      padding-top: 5px;
    }
    .el-dialog__body {
      padding-top: 0;
    }
  }
}
</style>
